#pragma once
#include "Pascal.h"
typedef Byte* TBytes;
typedef TBytes* PBytes;

PtrUInt CalcJumpOffset(Pointer dst, Pointer src);
Boolean WriteJumpAtAddress(Handle Process, Pointer src, Pointer dst, PBytes OriginalBytes);
Boolean WriteCallAtAddress(Handle Process, Pointer src, Pointer dst);
Boolean WriteCallAtAddress(Handle Process, Pointer src, Pointer dst, Pointer &OldDst);
Boolean Hook(Pointer OrigFunc, Pointer HookFunc, Pointer NewFunc, PBytes OldBytes);
procedure UnHook(Pointer OrigFunc, Pointer NewFunc, PBytes OldBytes);